
/**
* @Title: ItemController.java
* @Package com.leetone.controller
* @Description: 【】
* @date 2018年3月10日 下午10:00:31
* @version V1.0
* @Company: 上海
* @author:[谭磊][leetone123@163.com]
*/

package com.leetone.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.leetone.pojo.Item;
import com.leetone.service.ItemService;
import com.leetone.vo.EUDataGridResult;

/**
* @ClassName: ItemController
* @Description: 【商品】
* @date 2018年3月10日 下午10:00:31
* @Company: 上海
* @author:[谭磊][leetone123@163.com]
*/
@Controller
@RequestMapping("")
public class ItemController {
	@Autowired
	private ItemService itemService;
	
	@RequestMapping("/item/{itemId}")
	@ResponseBody
	public Item getItemById(@PathVariable Long itemId)
	{
		return itemService.getItemById(itemId);
	}
	
	@RequestMapping("/item/list")
	@ResponseBody
	public EUDataGridResult getItemList(Integer page,Integer rows)
	{
		return itemService.getItemList(page, rows);
	}
}
